import request from "@/plugins/request";
import type { BasicResType } from "../../typings/basic";

/**
 * 获取数据
 **/
export const getMockApiData = (params: any): Promise<BasicResType> => {
  return request({
    url: "/api/test",
    method: "get",
    params,
  }).then((res: BasicResType) => {
    return res || {};
  });
};
/**
 * 发送数据
 **/
export const postData = (params: any): Promise<BasicResType> => {
  return request({
    url: "/api/post",
    method: "post",
    params,
  }).then((res: BasicResType) => {
    return res || {};
  });
};
